package edu.cqie.smartfarm.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "牧场DTO对象", description = "牧场DTO对象")
public class FarmDTO {

    @ApiModelProperty(value = "牧场名称，字符串类型，非空")
    @NotNull(message = "牧场名称不能为空")
    @Length(min = 1, max = 100, message = "牧场名称长度最多100个字符")
    private String farmName;

    @ApiModelProperty(value = "场地规模，整数类型，表示牧场占地面积，单位平方米，非空")
    @NotNull(message = "场地规模不能为空")
    @Max(value = 999999, message = "场地规模不能超过999999")
    @Min(value = 100, message = "场地规模不能小于100")
    private Integer siteScale;

    @ApiModelProperty(value = "养殖规模，整数类型，表示当前养殖牲畜的数量，非空")
    @NotNull(message = "养殖规模不能为空")
    @Max(value = 999999, message = "养殖规模不能超过999999")
    private Integer breedingScale;

    @ApiModelProperty(value = "省，字符串类型，表示牧场所在的省份")
    @NotNull(message = "省不能为空")
    private String province;

    @ApiModelProperty(value = "市，字符串类型，表示牧场所在的城市")
    @NotNull(message = "市不能为空")
    private String city;

    @ApiModelProperty(value = "区/县，字符串类型，表示牧场所在的区或县")
    @NotNull(message = "区/县不能为空")
    private String districtCounty;

    @ApiModelProperty(value = "详细地址，文本类型，提供牧场的具体位置信息")
    @NotNull(message = "详细地址不能为空")
    private String address;

    @ApiModelProperty(value = "位置，存储牧场的经纬度坐标，由地图服务自动生成，非空")
    @NotNull(message = "位置不能为空")
    private String location;

    @ApiModelProperty(value = "牲畜品种ID，逻辑外键，指向数据字典中牲畜品种对应的记录ID")
    @NotNull(message = "牲畜品种ID不能为空")
    private Integer dictionaryDataId;
}
